/*
 * Copyright (c) 2009, Jan Pastor. All Rights Reserved.
 */

package sk.jp.jitag.model;

import sk.jp.jitag.dao.db4o.Column;
import sk.jp.jitag.dao.db4o.BaseEntity;

/**
 * Database version info.
 */
public class DbVersion extends BaseEntity {

    private static final Column _VERSION = new Column("version");

    //----------------------------------------------------------------------

    private Integer version;

    //----------------------------------------------------------------------

    public DbVersion(Integer version) {
        checkNotNull(_VERSION, version);

        this.version = version;
    }

    public Integer getVersion() {
        return version;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder();
        sb.append("DbVersion");
        sb.append("{version=").append(version);
        sb.append('}');
        return sb.toString();
    }
}
